package com.springboot.chapter4.aspect;

import org.aspectj.lang.annotation.*;

/**
 * 作者：paopao
 * 版本：1.0
 */
@Aspect
public class MyAspect2 {

    @Pointcut("execution(* com.springboot.chapter4.aspect.service.impl.UserServiceImpl.manyAspects(..))")
    public void manyAspects() {}

    @Before("manyAspects()")
    public void before() {
        System.out.println("MyAspect2 before............");
    }

    @After("manyAspects()")
    public void after() {
        System.out.println("MyAspect2 after............");
    }

    @AfterReturning("manyAspects()")
    public void afterReturning() {
        System.out.println("MyAspect2 afterReturning............");
    }

    @AfterThrowing("manyAspects()")
    public void afterThrowing() {
        System.out.println("MyAspect2 afterThrowing............");
    }

}
